import {reqSearchList} from "@/api";
const state = {
    searchList : {}
}
const getters ={
    trademarkList(state){
        return state.searchList.trademarkList
    },
    attrsList(state){
        return state.searchList.attrsList
    },
    goodsList(state){
        return state.searchList.goodsList
    },
    totalPages(state){
        return state.searchList.totalPages
    }
}
const mutations = {
    SET_SEARCH_LIST(state,payload){
        state.searchList = payload.searchList
    }
}
const actions = {
    async getSearchList({commit},searchParams){
        const result  = await reqSearchList(searchParams)
        commit("SET_SEARCH_LIST",{searchList:result})
    }
}

export default {
    namespaced:true,
    state,
    getters,
    mutations,
    actions
}